#include <bits/stdc++.h>
using namespace std;
#define int long long

void solve() {
    int n, k, x;
    cin >> n >> k >> x;
    int t1 = n - k;
    int t = (n * (n + 1)) / 2;
    t -= (t1 * (t1 + 1)) / 2;
    if(x > t) {
        cout << "NO\n";
        return;
    }
    int p = (k * (k + 1)) / 2;
    if(x < p) {
        cout << "NO\n";
        return;
    }
    cout << "YES\n";
}

signed main() {
    int t;
    cin >> t; while(t--) solve();
    return 0;
}